package crp.core.course.domain.services;

import crp.core.course.domain.models.PlanCourseEntity;
import crp.core.course.domain.repositories.PlanCourseRepository;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.Collection;
import java.util.stream.Stream;

@ApplicationScoped
public class PlanCourseSearcher {
    private final PlanCourseRepository subjectRepository;

    @Inject
    public PlanCourseSearcher(PlanCourseRepository subjectRepository) {
        this.subjectRepository = subjectRepository;
    }

    public Stream<PlanCourseEntity> byIds(Collection<String> ids) {
        return subjectRepository.findByIds(ids);
    }
}
